﻿@using CodeCamp.Models.Schedule
@using CodeCamp.Models.Shared
@using CodeCamp.Infrastructure.Extensions
@model ScheduleAgendaViewModel
@{
    ViewBag.Title = "";
    string headline;
    if ((@Model != null) && (@Model.EventDisplayName != null))
    {
        ViewBag.Title = @Html.Encode(@Model.EventDisplayName + " | Agenda");
        headline = @Model.EventDisplayName + " Agenda";
    }
    else
    {
        ViewBag.Title = "Code Camp | Agenda";
        headline = "Code Camp Agenda";
    }
}
@section headaddon {
<style>
    table.agendaGrid
    {
        border-collapse: collapse;
        border: solid 1px;
        margin: 0;
    }
</style>
}

@if (Model.AgendaIsPublic)
{
<h2>@headline</h2>
}
else
{
<h2>@headline - NOT YET PUBLIC</h2>
}

<p>View the @Html.ActionLink("Session Schedule", "Index", new { eventName = @Model.EventShortName })</p>
<h3>@Model.EventStartDate.ToLongDateString()</h3>
@if (!string.IsNullOrWhiteSpace(Model.AgendaPartialView))
{
    @Html.Partial(Model.AgendaPartialView)
}

@section sidebar {
    @Html.Partial("SidebarCommonPartial")
}
